package File::Searcher::Basic;

#use feature ':5.10';
use Moose;
#use MooseX::Singleton;
use Carp;

has 'exclude' => (
	is =>'rw', 
	isa =>'ArrayRef[Str]',
	default => sub { 
				[qw(/bin /boot /dev /etc /lib /media /opt /proc /root /sbin
				/srv /sys /tmp /usr /var)]} );

sub genDB {
	my $self = shift;
	system('slocate -U / -e ' . 
			join( ',',@{$self->exclude} ). 
			' -l0 -o ~/filedb.db') or croak;
	return 1;
}

no Moose;
__PACKAGE__->meta->make_immutable;
1;
